package Array_lib;
import java.util.Scanner;
public class Common {
	public static int min(int[] a)
	{
		int min=a[0];
		for(int i=0;i<a.length;i++){
			if(a[i]<min)
				min=a[i];
		}
		return min;
	}
	public static int sum(int[] a){
		int s=0;
		for(int i=0;i<a.length;i++)
			s+=a[i];
		return s;
	}
	public static void sort(int[] a){
		for(int i=0;i<a.length-1;i++)
			for(int j=i+1;j<a.length;j++)
				if(a[i]>a[j])
				{
					int tmp =a[i];
					a[i] = a[j];
					a[j]=tmp;
				}
	}
	public static void print(int[] a){
		for(int i=0;i<a.length;i++)
			System.out.print(a[i]+"\t");
	}
}
//nhap xuat mang
public class io{
	public static void nhapmang(int[] a){
		System.out.println("Nhap so phan tu cua mang");
		Scanner scanner = new Scanner(System.in);
		int n=scanner.nextInt();
		for(int i=0;i<n;i++){
			System.out.print("a["+i+"]= ");
			a[i]=scanner.nextInt();
		}
	}
	public static void xuatmang(int[] a){
		for(int i=0;i<a.length;i++){
			System.out.print(a[i] + "\t");
		}
	}
}